home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
VRML 2.0 Sourcebook (2nd Edition)
/
VRML 2.0 Sourcebook CD [md5 fed90f4f9c39d5a60d477058775c7e21].iso
/
book
/
mac
/
ch22
/
22fig04.wrl
< prev
next >
Wrap
Text File
|
1996-09-23
|
1KB
|
60 lines
#VRML V2.0 utf8
# The VRML 2.0 Sourcebook
# Copyright [1997] By
# Andrea L. Ames, David R. Nadeau, and John L. Moreland
Group {
children [
# Initial background
Background {
skyColor [ 0.0 0.2 0.7, 0.0 0.5 1.0, 1.0 1.0 1.0 ]
skyAngle [ 1.309, 1.571 ]
groundColor [ 0.1 0.1 0.0, 0.4 0.25 0.2, 0.6 0.6 0.6 ]
groundAngle [ 1.309, 1.571 ]
},
# Alternate backgrounds
DEF AltBack1 Background {
skyColor [ 1.0 0.0 0.0, 1.0 0.4 0.0, 1.0 1.0 0.0 ]
skyAngle [ 1.309, 1.571 ]
groundColor [ 0.1 0.1 0.0, 0.5 0.25 0.2, 0.6 0.6 0.2 ]
groundAngle [ 1.309, 1.571 ]
},
DEF AltBack2 Background {
skyColor [ 1.0 0.0 0.8, 0.5 0.0 0.8, 0.0 0.0 0.8 ]
skyAngle [ 1.309, 1.571 ]
groundColor [ 0.0 0.0 0.1, 0.0 0.1 0.3, 0.3 0.3 0.6 ]
groundAngle [ 1.309, 1.571 ]
},
# Shapes to act as buttons
Transform {
translation -2.0 0.0 0.0
children [
Shape {
appearance Appearance {
material Material {
diffuseColor 1.0 0.0 0.0
}
}
geometry Box { }
},
DEF TouchBox TouchSensor { }
]
},
Transform {
translation 2.0 0.0 0.0
children [
Shape {
appearance Appearance {
material Material {
diffuseColor 0.0 0.0 0.8
}
}
geometry Sphere { }
},
DEF TouchSphere TouchSensor { }
]
}
]
}
ROUTE TouchBox.isActive TO AltBack1.set_bind
ROUTE TouchSphere.isActive TO AltBack2.set_bind